(function () {
  var divID = "";
  jwplayer = function (id) {
    divID = id;
    return _api
  };
  var _api = {
    setup: function () {
      var message = "There was an error retrieving your embed.:Please double check your hosted URL in your <a href='http://account.jwplayer.com'>JW Dashboard</a>.";
      if (typeof error_message !== 'undefined') message=error_message;
      var container = document.getElementById(divID);
      var style = container.style;
      style.backgroundColor = "#000";
      style.color = "#FFF";
      style.width = '480px';
      style.height = '270px';
      style.display = "table";
      style.opacity = 1;

      var text = document.createElement("p"), textStyle = text.style;
      textStyle.verticalAlign = "middle";
      textStyle.textAlign = "center";
      textStyle.display = "table-cell";
      textStyle.font = "15px/20px Arial, Helvetica, sans-serif";
      text.innerHTML = message.replace(":", ":<br>");

      container.innerHTML = "";
      container.appendChild(text);
      return _api;
    },
    getRenderingMode: function () {
      return _api;
    },
    onReady: function (callback) {
      return _api;
    },
    getPlaylist: function () {
      return _api;
    },
    getPlaylistItem: function (index) {
      return _api;
    },
    load: function (playlist) {
      return _api;
    },
    playlistItem: function (index) {
      return _api;
    },
    onPlaylist: function (callback) {
      return _api;
    },
    onPlaylistItem: function (callback) {
      return _api;
    },
    onComplete: function (callback) {
      return _api;
    },
    onPlaylistComplete: function (callback) {
      return _api;
    },
    getBuffer: function () {
      return _api;
    },
    onBufferChange: function (callback) {
      return _api;
    },
    getState: function () {
      return _api;
    },
    play: function (state) {
      return _api;
    },
    pause: function (state) {
      return _api;
    },
    stop: function () {
      return _api;
    },
    onBeforePlay: function (callback) {
      return _api;
    },
    onPlay: function (callback) {
      return _api;
    },
    onPause: function (callback) {
      return _api;
    },
    onBuffer: function (callback) {
      return _api;
    },
    onIdle: function (callback) {
      return _api;
    },
    getPosition: function () {
      return _api;
    },
    getDuration: function () {
      return _api;
    },
    seek: function (position) {
      return _api;
    },
    onSeek: function (callback) {
      return _api;
    },
    onTime: function (callback) {
      return _api;
    },
    getMute: function () {
      return _api;
    },
    getVolume: function () {
      return _api;
    },
    setMute: function (state) {
      return _api;
    },
    setVolume: function (volume) {
      return _api;
    },
    onMute: function (callback) {
      return _api;
    },
    onVolume: function (callback) {
      return _api;
    },
    getFullscreen: function () {
      return _api;
    },
    getHeight: function () {
      return _api;
    },
    getWidth: function () {
      return _api;
    },
    resize: function (width, height) {
      return _api;
    },
    onFullscreen: function (callback) {
      return _api;
    },
    getQualityLevels: function () {
      return _api;
    },
    getCurrentQuality: function () {
      return _api;
    },
    setCurrentQuality: function (index) {
      return _api;
    },
    onQualityLevels: function (callback) {
      return _api;
    },
    onQualityChange: function (callback) {
      return _api;
    },
    addButton: function (icon, label, handler, id) {
      return _api;
    },
    removeButton: function (id) {
      return _api;
    },
    getControls: function () {
      return _api;
    },
    getSafeRegion: function () {
      return _api;
    },
    setControls: function (controls) {
      return _api;
    },
    onControls: function (callback) {
      return _api;
    },
    onDisplayClick: function (callback) {
      return _api;
    },
    onError: function (callback) {
      return _api;
    },
    onMeta: function (callback) {
      return _api;
    }
  }
})();